package com.geyue.controller;

import com.geyue.core.model.Help;
import com.geyue.core.service.BannerService;
import com.geyue.core.service.HelpService;
import com.geyue.core.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created by Chen on 2017/4/20.
 */
@RestController
@RequestMapping("/api/help")
public class HelpController {

    @Autowired
    private HelpService helpService;


    @RequestMapping(value = "/saveHelp",method = RequestMethod.POST)
    @ResponseBody
    public int  saveHelp(Help help){

        help.setAddTime(new Date());

        return helpService.save(help);
    }





}
